// Learn TypeScript:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html

import SDKManager from "../SDKManager";

const {ccclass, property} = cc._decorator;

@ccclass
export default class getopenId extends cc.Component {



    start () {
        let _text=this.node.getChildByName("test").getComponent(cc.Label);
        _text.string="";
        this.schedule(()=>{
            if(SDKManager.getInstance().openid != "" && SDKManager.getInstance().openid != undefined && _text.string  == ""){
                _text.string="ID："+ SDKManager.getInstance().openid;
            }
        },0.2,cc.macro.REPEAT_FOREVER,0.2);
    }

    // update (dt) {}
}
